#include "modes.h"
#include "sm4.h"

int sm4_wrap_key(sm4_key_t* key, const unsigned char* iv, unsigned char* out,
                 const unsigned char* in, unsigned int inlen)
{
    return CRYPTO_128_wrap(key, iv, out, in, inlen, (block128_f)sm4_encrypt);
}

int sm4_unwrap_key(sm4_key_t* key, const unsigned char* iv, unsigned char* out,
                   const unsigned char* in, unsigned int inlen)
{
    return CRYPTO_128_unwrap(key, iv, out, in, inlen, (block128_f)sm4_encrypt);
}
